# @Author   : 懒羊羊
# @File     : conftest.py
# @Time     : 2024/12/13 9:30
import pytest
from pages.loginpage import Login
from pages.firstpage import FirstPage


def pytest_collection_modifyitems(items):
    # 解决运行结果乱码问题
    for item in items:
        item.name = item.name.encode('UTF-8').decode('unicode-escape')
        item._nodeid = item.nodeid.encode('UTF-8').decode('unicode-escape')


@pytest.fixture(scope='class')
def get_firstpage():
    fp = Login().go_to_firstpage()

    yield fp

    fp.lougout()


